function()
        payable
        minimalContribution
    {
        require(allowContribution);

        
        if (!certifier.certified(msg.sender)) {
            revert();
        }

        
        uint256 amountInWei = msg.value;

        
        uint256 amountOfEDU = 0;

        if (block.timestamp > preSaleStartTime && block.timestamp < preSaleEndTime) {
            amountOfEDU = amountInWei.mul(EDU_PER_ETH_EARLY_PRE_SALE).div(100000000000000);
            if(!(WEIContributed[msg.sender] > 0)) {
                amountOfEDU += EDU_KYC_BONUS;  
            }
            if (earlyPresaleEDUSupply > 0 && earlyPresaleEDUSupply >= amountOfEDU) {
                require(updateEDUBalanceFunc(presaleAddress, amountOfEDU));
                earlyPresaleEDUSupply = earlyPresaleEDUSupply.sub(amountOfEDU);
            } else if (PresaleEDUSupply > 0) {
                if (earlyPresaleEDUSupply != 0) {
                    PresaleEDUSupply = PresaleEDUSupply.add(earlyPresaleEDUSupply);
                    earlyPresaleEDUSupply = 0;
                }
                amountOfEDU = amountInWei.mul(EDU_PER_ETH_PRE_SALE).div(100000000000000);
                if(!(WEIContributed[msg.sender] > 0)) {
                    amountOfEDU += EDU_KYC_BONUS;
                }
                require(PresaleEDUSupply >= amountOfEDU);
                require(updateEDUBalanceFunc(presaleAddress, amountOfEDU));
                PresaleEDUSupply = PresaleEDUSupply.sub(amountOfEDU);
            } else {
                revert();
            }
        } else if (block.timestamp > saleStartTime && block.timestamp < saleEndTime) {
            
            amountOfEDU = amountInWei.mul(EDU_PER_ETH_SALE).div(100000000000000);
            require(totalEDUSLeft >= amountOfEDU);
            require(updateEDUBalanceFunc(saleAddress, amountOfEDU));
        } else {
            
            revert();
        }

        
        totalWEIInvested = totalWEIInvested.add(amountInWei);
        assert(totalWEIInvested > 0);
        
        uint256 contributedSafe = WEIContributed[msg.sender].add(amountInWei);
        assert(contributedSafe > 0);
        WEIContributed[msg.sender] = contributedSafe;

        
        contributionsAddress.transfer(amountInWei);

        
        CreatedEDU(msg.sender, amountOfEDU);
    }