contract TokenController is multiowned {

  GatherToken public token;

  constructor(address[] _owners, uint _required, address _tokenAddress) multiowned(_owners, _required) public {
    token = GatherToken(_tokenAddress);
  }

  function setMinter(address _minter, uint256 _amount) public onlymanyowners(keccak256(msg.data)) {
    token.setMinter(_minter, _amount);
  }

  function mint(address _to, uint256 _amount) public onlymanyowners(keccak256(msg.data)) returns (bool){
    return token.mint(_to, _amount);
  }

  function unpauseTransfer() public onlymanyowners(keccak256(msg.data)) {
    token.unpauseTransfer();
  }

  function pauseTransfer() public onlymanyowners(keccak256(msg.data)) {
    token.pauseTransfer();
  }

  // The function is needed to protect from situation when we send GatherCoint to the contract by mistake.
  function transfer(address _to, uint256 _value) public onlymanyowners(keccak256(msg.data)) returns (bool) {
    return token.transfer(_to, _value);
  }

  function transferOwnership(address _newOwner) public onlyalmostallowners(keccak256(msg.data)) {
    token.transferOwnership(_newOwner);
  }

  function finishMinting() onlymanyowners(keccak256(msg.data)) public returns (bool) {
    token.finishMinting();
  }
}
// The TokenController is a proxy contract for implementation of multiowned control under token.
function transfer(address _to, uint256 _value) public onlymanyowners(keccak256(msg.data)) returns (bool) {
  return token.transfer(_to, _value);
}

// The function is needed to protect from situation when we send GatherCoint to the contract by mistake.