function refund() external {
        if(!funding) throw;
        if(block.timestamp <= fundingEnd) throw;
        if(totalTokens >= tokenCreationMin) throw;

        var ethuValue = balances[msg.sender];
        var ethValue = balancesEther[msg.sender];
        if (ethuValue == 0) throw;
        balances[msg.sender] = 0;
        balancesEther[msg.sender] = 0;
        totalTokens -= ethuValue;

        Refund(msg.sender, ethValue);
        if (!msg.sender.send(ethValue)) throw;
    }