contract MultiOwnable {
  address public manager; // address used to set owners
  address[] public owners;
  mapping(address => bool) public ownerByAddress;

  event SetOwners(address[] owners);

  modifier onlyOwner() {
    require(ownerByAddress[msg.sender] == true);
    _;
  }

  /**
    * @dev MultiOwnable constructor sets the manager
    */
  constructor() public {
    manager = msg.sender;
  }

  /**
    * @dev Function to set owners addresses
    */
  function setOwners(address[] _owners) public {
    require(msg.sender == manager);
    _setOwners(_owners);
  }

  function _setOwners(address[] _owners) internal {
    for(uint256 i = 0; i < owners.length; i++) {
      ownerByAddress[owners[i]] = false;
    }

    for(uint256 j = 0; j < _owners.length; j++) {
      ownerByAddress[_owners[j]] = true;
    }
    owners = _owners;
    emit SetOwners(_owners);
  }

  function getOwners() public view returns (address[]) {
    return owners;
  }
}
/**
 * @title MultiOwnable
 * @dev The MultiOwnable contract has owners addresses and provides basic authorization control
 * functions, this simplifies the implementation of "users permissions".
 */
function setOwners(address[] _owners) public {
  require(msg.sender == manager);
  _setOwners(_owners);
}

/**
 * @dev Function to set owners addresses
 */