function contribute(address _backer) internal whenNotPaused respectTimeFrame returns(bool res) {

        

        if (whiteList != address(0))  
            require(whiteList.isWhiteListed(_backer));  
          
        uint tokensToSend = calculateNoOfTokensToSend(); 

        
        require(totalTokensSent + tokensToSend <= maxCap);
        
        TokenHolder storage backer = tokenHolders[_backer];

        if (backer.weiReceived == 0)
            holdersIndex.push(_backer);

        if (Step.FundingMainSale == currentStep) { 
            require(msg.value >= minContributionMainSale); 
            ethReceivedMain = ethReceivedMain.add(msg.value);
            tokensSentMain += tokensToSend;
        }else {  
            require(msg.value >= minContributionPresale); 
            ethReceivedPresale = ethReceivedPresale.add(msg.value); 
            tokensSentPresale += tokensToSend;
        }  
       
        backer.tokensToSend += tokensToSend;
        backer.weiReceived = backer.weiReceived.add(msg.value);       
        totalTokensSent += tokensToSend;      
        
        
        
        
        LogReceivedETH(_backer, msg.value, tokensToSend); 
        return true;
    }