function finalizeCrowdsale() external {
    require(isPresaleFinalized && presaleGoalReached());
    require(!isCrowdsaleFinalized);
    require(block.timestamp > CROWDSALE_CLOSING_TIME);

    if (combinedGoalReached()) {
      wallet.transfer(address(this).balance);
    } else {
      emit RefundsEnabled();
    }

    emit CrowdsaleFinalized();
    isCrowdsaleFinalized = true;
  }