function buy() public payable {

        require(block.timestamp < pubEnd);          
        require(msg.value > 0);                     
        require(msg.value <= msg.sender.balance + msg.value);   

        
        require(msg.value + totalSold <= maxCap);

        
        uint256 tokenAmount = (msg.value * tokenUnit) / tokenPrice;

        
        require(tokenAmount<=TokenCHK(ESSgenesis).balanceOf(contractAddr));

        transferBuy(msg.sender, tokenAmount);       
        totalSold = totalSold.add(msg.value);       
        FWDaddrETH.transfer(msg.value);             

    }