func: function buyTokens(address beneficiary) public payable nonZeroAddress(beneficiary) {
      require(validPurchase());
  	uint256 weiAmount = msg.value;
      uint256 tokenPrice = fiat_contract.USD(0);
      if(startTime.add(15 days) >= block.timestamp) {
          tokenPrice = tokenPrice.mul(200).div(10 ** 8);
  		if(!compareStages(stage, "pre")){
  			stage = "pre";
  		}
      } else if(startTime.add(45 days) >= block.timestamp) {
          tokenPrice = tokenPrice.mul(300).div(10 ** 8);		
  		if(!compareStages(stage, "main_first")){
  			stage = "main_first";
  		}
      } else if(startTime.add(52 days) >= block.timestamp) {
          tokenPrice = tokenPrice.mul(330).div(10 ** 8);		
  		if(!compareStages(stage, "main_second")){
  			stage = "main_second";
  		}
      } else if(startTime.add(59 days) >= block.timestamp) {
          tokenPrice = tokenPrice.mul(360).div(10 ** 8);
  		if(!compareStages(stage, "main_third")){
  			stage = "main_third";
  		}
      } else if(startTime.add(66 days) >= block.timestamp) {
          tokenPrice = tokenPrice.mul(400).div(10 ** 8);
  		if(!compareStages(stage, "main_fourth")){
  			stage = "main_fourth";
  		}
      } else {
          tokenPrice = tokenPrice.mul(150).div(10 ** 8);
  		if(!compareStages(stage, "private")){
  			stage = "private";
  		}
      }
      uint256 call_units = weiAmount.div(tokenPrice).mul(10 ** 10);
      uint256 callg_units = call_units.mul(200);
      forwardFunds();
      weiRaised = weiRaised.add(weiAmount);
      emit TokenPurchase(msg.sender, beneficiary, weiAmount, call_units);
      require(token_call.transfer(beneficiary, call_units));
      require(token_callg.transfer(beneficiary, callg_units));
    }