contract Pausable is Owned {
  event Pause();
  event Unpause();

  bool public paused = false;

  //Modifier to make a function callable only when the contract is not paused.
  modifier whenNotPaused() {
    require(!paused);
    _;
  }


  //Modifier to make a function callable only when the contract is paused.
  modifier whenPaused() {
    require(paused);
    _;
  }

  //called by the owner to pause, triggers stopped state
  function pause() onlyOwner whenNotPaused public {
    paused = true;
    emit Pause();
  }

  //called by the owner to unpause, returns to normal state
  function unpause() onlyOwner whenPaused public {
    paused = false;
    emit Unpause();
  }
}
// Pausable Contract
function pause() onlyOwner whenNotPaused public {
  paused = true;
  emit Pause();
}

//called by the owner to pause, triggers stopped state