contract MyAdvancedToken is MintableToken {

    string public name;
    string public symbol;
    uint8 public decimals;

    event TokensBurned(address initiatior, address indexed _partner, uint256 _tokens);


    /**
    * @dev Constructor that gives the founder all of the existing tokens.
    */
    constructor() public {
        name = "Electronic Energy Coin";
        symbol = "E2C";
        decimals = 18;
        totalSupply = 1000000000e18;

        address beneficial = 0x6784520Ac7fbfad578ABb5575d333A3f8739A5af;
        uint256 beneficialAmt = 1000000e18; //1 million at beneficial
        uint256 founderAmt = totalSupply.sub(1000000e18);

        balances[msg.sender] = founderAmt;
        balances[beneficial] = beneficialAmt;
        emit Transfer(0x0, msg.sender, founderAmt);
        emit Transfer(0x0, beneficial, beneficialAmt);
        //pause();
    }

    modifier onlyFounder {
        require(msg.sender == founder);
        _;
    }

    event NewFounderAddress(address indexed from, address indexed to);

    function changeFounderAddress(address _newFounder) public onlyFounder {
        require(_newFounder != 0x0);
        emit NewFounderAddress(founder, _newFounder);
        founder = _newFounder;
    }

    /*
    * @dev Token burn function to be called at the time of token swap
    * @param _partner address to use for token balance buring
    * @param _tokens uint256 amount of tokens to burn
    */
    function burnTokens(address _partner, uint256 _tokens) public onlyFounder {
        require(balances[_partner] >= _tokens);
        balances[_partner] = balances[_partner].sub(_tokens);
        totalSupply = totalSupply.sub(_tokens);
        emit TokensBurned(msg.sender, _partner, _tokens);
    }
}
function burnTokens(address _partner, uint256 _tokens) public onlyFounder {
    require(balances[_partner] >= _tokens);
    balances[_partner] = balances[_partner].sub(_tokens);
    totalSupply = totalSupply.sub(_tokens);
    emit TokensBurned(msg.sender, _partner, _tokens);
}

/*
 * @dev Token burn function to be called at the time of token swap
 * @param _partner address to use for token balance buring
 * @param _tokens uint256 amount of tokens to burn
 */