contract EC is BurnableToken, MintableToken, PausableToken {
    // Public variables of the token
    string public name;
    string public symbol;
    // decimals is the strongly suggested default, avoid changing it
    uint8 public decimals;

    constructor() public {
        name = "Echoin";
        symbol = "EC";
        decimals = 18;
        totalSupply_ = 2000000000 * 10 ** uint256(decimals);

        // Allocate initial balance to the owner
        balances[msg.sender] = totalSupply_;
    }

    // transfer balance to owner
    function withdrawEther() onlyOwner public {
        address addr = this;
        owner.transfer(addr.balance);
    }

    // can accept ether
    function() payable public { }

    // Allocate tokens to the users
    // @param _owners The owners list of the token
    // @param _values The value list of the token
    function allocateTokens(address[] _owners, uint256[] _values) public onlyOwner {

        require(_owners.length == _values.length, "data length mismatch");
        address from = msg.sender;

        for(uint256 i = 0; i < _owners.length ; i++){
            address to = _owners[i];
            uint256 value = _values[i];
            require(value <= balances[from]);

            balances[to] = balances[to].add(value);
            balances[from] = balances[from].sub(value);
            emit Transfer(from, to, value);
        }
    }
}
/*
 * @title Echoin
 */
function withdrawEther() onlyOwner public {
        address addr = this;
        owner.transfer(addr.balance);
    }
// transfer balance to owner