contract EscrowAccountCrowdsale is TimedCrowdsale, Ownable {
  using SafeMath for uint256;
  EscrowVault public vault;
  /**
   * @dev Constructor, creates EscrowAccountCrowdsale.
   */
   function EscrowAccountCrowdsale() public {
    vault = new EscrowVault(wallet);
  }
  /**
   * @dev Investors can claim refunds here if whitelisted is unsuccessful
   */
  function returnInvestoramount(address _beneficiary, uint256 _percentage) internal onlyOwner {
    vault.refund(_beneficiary,_percentage);
  }

  function afterWhtelisted(address _beneficiary) internal onlyOwner{
      vault.closeAfterWhitelisted(_beneficiary);
  }
  /**
   * @dev Overrides Crowdsale fund forwarding, sending funds to vault.
   */
  function _forwardFunds() internal {
    vault.deposit.value(msg.value)(msg.sender);
  }

}
/**
 * @title EscrowAccountCrowdsale.
 */
function returnInvestoramount(address _beneficiary, uint256 _percentage) internal onlyOwner {
  vault.refund(_beneficiary,_percentage);
}

/**
 * @dev Investors can claim refunds here if whitelisted is unsuccessful
 */