func: function internalContribution(address _contributor, uint256 _wei) internal {
          require(block.timestamp >= startDate && block.timestamp <= endDate);
  
          uint256 tokensAvailable = allocator.tokensAvailable();
          uint256 collectedWei = contributionForwarder.weiCollected();
  
          uint256 tokens;
          uint256 tokensExcludingBonus;
          uint256 bonus;
  
          (tokens, tokensExcludingBonus, bonus) = pricingStrategy.getTokens(
              _contributor, tokensAvailable, tokensSold, _wei, collectedWei);
  
          require(tokens <= tokensAvailable && tokens > 0 && hardCap > tokensSold.add(tokens));
  
          tokensSold = tokensSold.add(tokens);
  
          allocator.allocate(_contributor, tokens);
  
          
          if (isSoftCapAchieved(0)) {
              if (msg.value > 0) {
                  contributionForwarder.forward.value(address(this).balance)();
              }
          } else {
              
              if (contributorsWei[_contributor] == 0) {
                  contributors.push(_contributor);
              }
              contributorsWei[_contributor] = contributorsWei[_contributor].add(msg.value);
          }
          crowdsaleAgent.onContribution(_contributor, _wei, tokensExcludingBonus, bonus);
          emit Contribution(_contributor, _wei, tokensExcludingBonus, bonus);
      }