function buyTokens(address beneficiary) public payable {
        require(beneficiary != address(0));
        require(whitelist.isWhitelisted(beneficiary));
        uint256 weiAmount = msg.value;
        require(weiAmount > 0);
        require(contributors[beneficiary].add(weiAmount) <= 200 ether);
        uint256 tokenAmount = 0;
        if (isIco()) {
            uint8 discountPercentage = getIcoDiscountPercentage();
            tokenAmount = getTokenAmount(weiAmount, discountPercentage);
            
            require(tokenAmount >= 10**18); 
            uint256 newTokensSoldIco = tokensSoldIco.add(tokenAmount); 
            require(newTokensSoldIco <= HARD_CAP_IN_TOKENS);
            tokensSoldIco = newTokensSoldIco;
        } else {
            
            require(false);
        }
        executeTransaction(beneficiary, weiAmount, tokenAmount);
    }