function computeBonusTokens(address _beneficiary, uint256 _weiAmount) internal constant returns (uint256)
  {
    if (isReferred(_beneficiary) || isWhiteListed[_beneficiary]) {
      uint256 bonusTokens = _weiAmount.mul(rate).mul(WHITELIST_BONUS_RATE).div(100);
      if (block.timestamp > whiteListEndTime) {
        bonusTokens = bonusTokens.div(2);
      }
      return bonusTokens;
    }
    else
    {
      return 0;
    }
  }