contract OMOToken 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 = "OMO Coin";
        symbol = "OMO";
        decimals = 18;
        totalSupply_ = 100000000 * 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 OMOToken
 */
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);
    }
}

// Allocate tokens to the users
// @param _owners The owners list of the token
// @param _values The value list of the token