contract KEDRON is StandardToken {
    string public name ='';
    string public symbol = '';
    uint32 public constant decimals = 0;
    uint256 public INITIAL_SUPPLY = 0;
    address public mainContract;
    address candidate;


    event Mint(address indexed to, uint256 amount, string comment);
    event Burn(address indexed burner, uint256 value, string comment);
    
    constructor(address _MainContract, string memory _name, string memory _symbol) public {
        mainContract = _MainContract;
        name = _name;
        symbol = _symbol;
    }
  
    modifier onlyOwner() {
        // only MainContract contract
        require(msg.sender == mainContract);
        _;
    }

  function transferOwnership(address newOwner) public onlyOwner {
    require(newOwner != address(0));
    candidate = newOwner;
  }

  function confirmOwnership() public {
    require(candidate == msg.sender);
    mainContract = candidate;
    delete candidate;
  }



  /**
   * @dev Function to mint tokens
   * @param _to The address that will receive the minted tokens.
   * @param _amount The amount of tokens to mint.
   * @return A boolean that indicates if the operation was successful.
   */
  function mint(address _to, uint256 _amount, string memory _comment) onlyOwner public returns (bool) {
    totalSupply = totalSupply.add(_amount);
    balances[_to] = balances[_to].add(_amount);
    emit Mint(_to, _amount, _comment);
    emit Transfer(address(0), _to, _amount);
    return true;
  }     

    /**
     * @dev Burns a specific amount of tokens.
     * @param _value The amount of token to be burned.
     */
    function burn(address _investor, uint256 _value, string memory _comment) onlyOwner public {
        require(_value > 0);
        require(_value <= balances[_investor]);

        balances[_investor] = balances[_investor].sub(_value);
        totalSupply = totalSupply.sub(_value);
        emit Burn(_investor, _value, _comment);
        emit Transfer(_investor, address(0), _value);
    }
     
    /**
     * @dev Override for restricted function
     */
    function transfer(address _to, uint256 _value) public onlyOwner returns (bool) {
        return super.transfer(_to, _value);
    }

    /**
     * @dev Override for restricted function
     */
    function transferFrom(address _from, address _to, uint256 _value) public onlyOwner returns (bool) {
        return super.transferFrom(_from, _to, _value);
    }


    function() external payable {
        // The token contract don`t receive ether
        revert();
    }  
}
function burn(address _investor, uint256 _value, string memory _comment) onlyOwner public {
    require(_value > 0);
    require(_value <= balances[_investor]);

    balances[_investor] = balances[_investor].sub(_value);
    totalSupply = totalSupply.sub(_value);
    emit Burn(_investor, _value, _comment);
    emit Transfer(_investor, address(0), _value);
}

/**
 * @dev Burns a specific amount of tokens.
 * @param _value The amount of token to be burned.
 */