function buyTokens(address beneficiary) public payable {
    require(beneficiary != address(0));
    require(validPurchase());

    uint256 weiAmount = msg.value;

    
    uint256 tokens = getTokenAmount(weiAmount);
   
    
    weiRaised = weiRaised.add(weiAmount);
    token.mint(beneficiary, tokens);
	contribution[beneficiary] = contribution[beneficiary].add(weiAmount);
    TokenPurchase(msg.sender, beneficiary, weiAmount, tokens);

    forwardFunds();
  }