contract Ownable {
  address public owner;
  
  constructor() public { 
    owner = msg.sender;
  }

  modifier onlyOwner() {
    if (msg.sender != owner) {
      revert();
    }
    _;
  }
  //transfer owner to another address
  function transferOwnership(address _newOwner) onlyOwner public {
    if (_newOwner != address(0)) {
      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 transferOwnership(address _newOwner) onlyOwner public {
    if (_newOwner != address(0)) {
      owner = _newOwner;
    }
  }
//transfer owner to another address