contract Pausable is Ownable {
    event Pause();
    event Unpause();
    
    bool _paused = false;
    
    function paused() public constant returns(bool)
    {
        return _paused;
    }
    
    
    /**
     * @dev modifier to allow actions only when the contract IS paused
     */
    modifier whenNotPaused() {
        require(!paused());
        _;
    }
    
    /**
     * @dev called by the owner to pause, triggers stopped state
     */
    function pause() onlyOwner public {
        require(!_paused);
        _paused = true;
        Pause();
    }
    
    /**
     * @dev called by the owner to unpause, returns to normal state
     */
    function unpause() onlyOwner public {
        require(_paused);
        _paused = false;
        Unpause();
    }
}
/**
 * @title Pausable
 * @dev Base contract which allows children to implement an emergency stop mechanism.
 */
function pause() onlyOwner public {
    require(!_paused);
    _paused = true;
    Pause();
}

/**
 * @dev called by the owner to pause, triggers stopped state
 */