function finalize() public inState(State.Success) onlyOwner stopInEmergency {

    
    require(!finalized);

    
    if(address(finalizeAgent) != 0) {
      finalizeAgent.finalizeCrowdsale();
    }

    finalized = true;
  }