contract PausableCrowdsale is TokenlessCrowdsale, Ownable {
  /**
   * Owner controllable switch to open or halt sale
   * This is independent from other checks such as cap, no other processes except owner should alter this value. This also means that even if hardCap is reached, this variable does not set to false on its own.
   * This variable is revocable, hence behaving more like a pause than close when turned to off.
   */
  bool public open = true;

  modifier saleIsOpen() {
    require(open);
    _;
  }

  function unpauseSale() external onlyOwner {
    require(!open);
    open = true;
  }

  function pauseSale() external onlyOwner saleIsOpen {
    open = false;
  }

  /**
   * @dev Extend parent behavior requiring sale to be opened
   */
  function _preValidatePurchase(address _beneficiary, uint256 _weiAmount) internal saleIsOpen {
    super._preValidatePurchase(_beneficiary, _weiAmount);
  }
}
/**
 * @title PausableCrowdsale
 * @dev Crowdsale allowing owner to halt sale process
 * Based on OpenZeppelin's TimedCrowdsale
 * @author U-Zyn Chua <uzyn@zynesis.com>
 */
function _preValidatePurchase(address _beneficiary, uint256 _weiAmount) internal saleIsOpen {
  super._preValidatePurchase(_beneficiary, _weiAmount);
}

/**
 * @dev Extend parent behavior requiring sale to be opened
 */