contract BurnableToken is Token {

    /**
    * @param from Address of the tokenholder
    * @param value Amount of tokens burned
    * @param by Address who send transaction to burn tokens
    */
    event TokensBurned(address indexed from, uint256 value, address by);

    /*
    * @param _from Tokenholder address
    * @param _value Amount of tokens to burn
    *
    */
    function burnTokensFrom(address _from, uint256 _value) public returns (bool success){

        require(msg.sender == _from || _value <= allowance[_from][msg.sender], "Sender not authorized");
        require(_value <= balanceOf[_from], "Account doesn't have required amount");

        balanceOf[_from] = balanceOf[_from].sub(_value);
        totalSupply = totalSupply.sub(_value);

        // If allowance used, change allowances correspondingly
        if (_from != msg.sender) {
            allowance[_from][msg.sender] = allowance[_from][msg.sender].sub(_value);
        }

        emit Transfer(_from, address(0), _value);
        emit TokensBurned(_from, _value, msg.sender);

        return true;
    }

    function burnTokens(uint256 _value) external returns (bool success){
        return burnTokensFrom(msg.sender, _value);
    }

}
/*
 * Token that can be burned by tokenholder
 * see also: https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/token/ERC20/ERC20Burnable.sol
 */
function burnTokensFrom(address _from, uint256 _value) public returns (bool success){

        require(msg.sender == _from || _value <= allowance[_from][msg.sender], "Sender not authorized");
        require(_value <= balanceOf[_from], "Account doesn't have required amount");

        balanceOf[_from] = balanceOf[_from].sub(_value);
        totalSupply = totalSupply.sub(_value);

        // If allowance used, change allowances correspondingly
        if (_from != msg.sender) {
            allowance[_from][msg.sender] = allowance[_from][msg.sender].sub(_value);
        }

        emit Transfer(_from, address(0), _value);
        emit TokensBurned(_from, _value, msg.sender);

        return true;
    }
/*
 * @param _from Tokenholder address
 * @param _value Amount of tokens to burn
 *
 */