contract Crowdsaleable is Pausable {
  event PauseCrowdsale();
  event UnpauseCrowdsale();

  bool public crowdsalePaused = true;

  /**
   * @dev modifier to allow actions only when the contract IS paused
   */
  modifier whenCrowdsaleNotPaused() {
    require(!crowdsalePaused);
    _;
  }

  /**
   * @dev modifier to allow actions only when the contract IS NOT paused
   */
  modifier whenCrowdsalePaused {
    require(crowdsalePaused);
    _;
  }

  /**
   * @dev called by the owner to pause, triggers stopped state
   */
  function pauseCrowdsale() public onlyOwner whenCrowdsaleNotPaused returns (bool) {
    crowdsalePaused = true;
    PauseCrowdsale();
    return true;
  }

  /**
   * @dev called by the owner to unpause, returns to normal state
   */
  function unpauseCrowdsale() public onlyOwner whenCrowdsalePaused returns (bool) {
    crowdsalePaused = false;
    UnpauseCrowdsale();
    return true;
  }
}
function unpauseCrowdsale() public onlyOwner whenCrowdsalePaused returns (bool) {
    crowdsalePaused = false;
    UnpauseCrowdsale();
    return true;
  }
/**
 * @dev called by the owner to unpause, returns to normal state
 */