contract Pausable is Admin {

    bool public paused = false;


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

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

    /**
     * @dev called by the admin to pause, triggers stopped state
     */
    function pause() public onlyAdmin whenNotPaused returns(bool) {
        paused = true;
        return true;
    }

    /**
     * @dev called by the admin to unpause, returns to normal state
     */
    function unpause() public onlyAdmin whenPaused returns(bool) {
        paused = false;
        return true;
    }
}
function pause() public onlyAdmin whenNotPaused returns(bool) {
    paused = true;
    return true;
}

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