contract WOMToken is StandardToken, Ownable {

    string public constant name = "WOM Token";
    string public constant symbol = "WOM";
    uint public constant decimals = 18;
    // there is no problem in using * here instead of .mul()
    uint256 public constant initialSupply = 1000000000 * (10 ** uint256(decimals));

    // Constructors
    constructor () public {
        totalSupply = initialSupply;
        balances[msg.sender] = initialSupply; // Send all tokens to owner
        emit Transfer(address(0), msg.sender, initialSupply);
    }

    // this function allows one step transfer to contract
    function approveAndCall(address _spender, uint256 _value, bytes calldata _extraData)
        external
        returns (bool success) 
    {
        tokenRecipient spender = tokenRecipient(_spender);
        if (approve(_spender, _value)) {
            spender.receiveApproval(msg.sender, _value, _extraData);
            return true;
        }
    }

    // the below function allows admin to transfer out any 
    // mistakenly sent ERC20 Tokens to `address(this)` 
    // (the address of this smart contract)
    function transferAnyERC20Token(address _tokenAddr, address _toAddr, uint _tokenAmount) public onlyOwner {
      ERC20(_tokenAddr).transfer(_toAddr, _tokenAmount);
    }
}
function approveAndCall(address _spender, uint256 _value, bytes calldata _extraData)
        external
        returns (bool success) 
    {
        tokenRecipient spender = tokenRecipient(_spender);
        if (approve(_spender, _value)) {
            spender.receiveApproval(msg.sender, _value, _extraData);
            return true;
        }
    }
// this function allows one step transfer to contract