contract Ownable {
    address public owner;
    address public newOwner;

    function Ownable() public {
        owner = msg.sender;
    }

    modifier onlyOwner() { 
        require(msg.sender == owner);
        _;
    }

    modifier onlyNewOwner() {
        require(msg.sender == newOwner);
        _;
    }
    /*
    // This code is dangerous because an error in the newOwner 
    // means that this contract will be ownerless 
    function transfer(address newOwner) public onlyOwner {
        require(newOwner != address(0)); 
        owner = newOwner;
    }
   */

    function proposeNewOwner(address _newOwner) external onlyOwner {
        require(_newOwner != address(0));
        newOwner = _newOwner;
    }

    function acceptOwnership() external onlyNewOwner {
        require(newOwner != owner);
        owner = newOwner;
    }
}
/*
 * Ownable
 *
 * Base contract with an owner.
 * Provides onlyOwner modifier, which prevents function from running if it is called by anyone other than the owner.
 */
function proposeNewOwner(address _newOwner) external onlyOwner {
        require(_newOwner != address(0));
        newOwner = _newOwner;
    }
/*
 // This code is dangerous because an error in the newOwner 
 // means that this contract will be ownerless 
 function transfer(address newOwner) public onlyOwner {
 require(newOwner != address(0)); 
 owner = newOwner;
 }
 */