function () public payable {
        uint256 receivedETH = 0;
        uint256 sendingSMSToken = 0;
        uint256 sendingSMSBonus = 0;
        Log(msg.value);

        
        if (!icoOnPaused && msg.sender != owner) {
            if (now <= endDate) {
                
                Log(currentPhase);

                
                receivedETH = (msg.value * UNIT);
                sendingSMSToken = safeDiv(receivedETH, tokenPrice);
                Log(sendingSMSToken);

                
                if (currentPhase == 1 || currentPhase == 2 || currentPhase == 3) {
                    
                    sendingSMSBonus = calcBonus(sendingSMSToken);
                    Log(sendingSMSBonus);
                }

                
                Log(sendingSMSToken);
                if (!transferTokens(msg.sender, sendingSMSToken, sendingSMSBonus))
                    revert();
            } else {
                revert();
            }

        } else {
            revert();
        }
    }