function () payable {
		if(msg.sender == etherGasProvider)
		{
			return;
		}
		if(!allContacts[msg.sender].isOnWhitelist || (now < startEpochTimestamp && msg.sender != admin) || now >= endEpochTimestamp || hasICOFinished || !tokenContractAddressReady)
		{
			revert();
		}
        uint depositedEther = msg.value;
        uint currentVaultBalance = tokenReward.balanceOf(tokenVaultAddress);
        uint totalAddressDeposit = safeAdd(allContacts[msg.sender].depositedEther, depositedEther);
        uint leftoverEther = 0;
		if(depositedEther < minAmmountToInvest || totalAddressDeposit > maxAmmountToInvest)
		{
			bool canEtherPassthrough = false;
		    if(totalAddressDeposit > maxAmmountToInvest)
		    {
		        uint passthroughEther = safeSub(maxAmmountToInvest, allContacts[msg.sender].depositedEther);   
		        if(passthroughEther > 0)
		        {
		            depositedEther = safeSub(depositedEther, 100000);   
		            if(depositedEther > passthroughEther)
		            {
		                leftoverEther = safeSub(depositedEther, passthroughEther);   
		            }
		            depositedEther = passthroughEther;
		            canEtherPassthrough = true;
		        }
		    }
		    if(!canEtherPassthrough)
		    {
		        revert();    
		    }
		}
		if (currentVaultBalance > 0)
		{
		
			if(safeSub(now, lastPriceCheck) > 300)
			{
				operationsInQueue.push(OperationInQueue(now, depositedEther, msg.sender, false));
				updatePrice();
			}else
			{
				sendTokens(msg.sender, depositedEther);
			}
		}else 
		{
			revert();
		}
		if(leftoverEther > 0)
		{
		    msg.sender.transfer(leftoverEther);
		}
    }