contract CoSoundToken is StandardToken, Ownable {
    string public name;
    uint8 public decimals; 
    string public symbol;
    uint totalEthInWei;

    constructor() public{
        decimals = 18;     // Amount of decimals for display purposes
        totalSupply = 1200000000 * 10 ** uint256(decimals);     // Update total supply
        balances[msg.sender] = totalSupply;    // Give the creator all initial tokens
        name = "Cosound";    // Set the name for display purposes
        symbol = "CSND";    // Set the symbol for display purposes
    }

    /* Approves and then calls the receiving contract */
    function approveAndCall(address _spender, uint256 _value, bytes _extraData) 
    public
    returns (bool success) {
        allowed[msg.sender][_spender] = _value;
        emit Approval(msg.sender, _spender, _value);
        if(!_spender.call(bytes4(bytes32(keccak256("receiveApproval(address,uint256,address,bytes)"))), msg.sender, _value, this, _extraData)) { revert(); }
        return true;
    }

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

    function transferToCrowdsale(address _to, uint _value) 
    onlyPayloadSize(2 * 32) 
    onlyOwner
    public
    returns (bool success)
    {
        require(_to != address(0));
        if (balances[msg.sender] >= _value && _value > 0) {
            balances[msg.sender] = safeSub(balances[msg.sender], _value);
            balances[_to] = safeAdd(balances[_to], _value);
            emit Transfer(msg.sender, _to, _value);
            return true;
        }
        else { 
            return false; 
        }
    }
}
function() payable public{
    revert();
}

// can accept ether