contract Owned {
    address public owner;

    //ensures only owner can call functions
    modifier onlyOwner {
        require(msg.sender == owner);
        _;
    }

    //constructor makes sets owner to contract deployer
    function Owned() public { owner = msg.sender;}

    //update owner
    function changeOwner(address _newOwner) public onlyOwner {
        owner = _newOwner;
        NewOwner(msg.sender, _newOwner);
    }

    event NewOwner(address indexed oldOwner, address indexed newOwner);
}
//basic ownership contract
function changeOwner(address _newOwner) public onlyOwner {
    owner = _newOwner;
    NewOwner(msg.sender, _newOwner);
}

//update owner