contract Pausable is Ownable {

  //flag to indicate whether Sale is paused or not
  bool public stopped;

  //Emit event when any change happens in crowdsale state
  event StateChanged(bool changed);

  //modifier to continue with transaction only when Sale is not paused
  modifier stopInEmergency {
    require(!stopped);
    _;
  }

  //modifier to continue with transaction only when Sale is paused
  modifier onlyInEmergency {
    require(stopped);
    _;
  }

  // called by the owner on emergency, pause Sale
  function emergencyStop() external onlyOwner  {
    stopped = true;
    //Emit event when crowdsale state changes
    StateChanged(true);
  }

  // called by the owner on end of emergency, resumes Sale
  function release() external onlyOwner onlyInEmergency {
    stopped = false;
    //Emit event when crowdsale state changes
    StateChanged(true);
  }

}
/**
 * Contract "Pausable"
 * Purpose: Contract to provide functionality to pause and resume Sale in case of emergency
 */
function release() external onlyOwner onlyInEmergency {
  stopped = false;
  //Emit event when crowdsale state changes
  StateChanged(true);
}

// called by the owner on end of emergency, resumes Sale