function _preValidatePurchase(address _beneficiary, uint256 _weiAmount) internal {
        super._preValidatePurchase(_beneficiary, _weiAmount);
        
        uint256 tokenAmount = _getTokenAmount(_weiAmount);
        
	if (block.timestamp < saleStartTime) {
            require(tokenPresaleSold.add(tokenAmount) <= tokenPresaleCap);
        } else {
        
            require(tokenSold.add(tokenAmount) <= totalTokenSaleCap);
        }
    }