contract KEFLA is Context, IERC20, Ownable {
    using SafeMath for uint256;
    using Address for address;

    mapping (address => uint256) private _rOwned;
    mapping (address => uint256) private _tOwned;
    mapping (address => mapping (address => uint256)) private _allowances;

    mapping (address => bool) private _isExcludedFromFee;

    mapping (address => bool) private _isExcluded;
    address[] private _excluded;
   
    uint256 private constant MAX = ~uint256(0);
    uint256 private _tTotal = 1000000000 * 10**6 * 10**18; 
    uint256 private _rTotal = (MAX - (MAX % _tTotal));
    uint256 private _tFeeTotal;

    string private _name = "Kefla Inu";
    string private _symbol = "KEFLA";
    uint8 private _decimals = 18;
    
    uint256 public _taxFee = 1;
    uint256 private _previousTaxFee = _taxFee;
    
    uint256 public _liquidityFee = 10;
    uint256 private _previousLiquidityFee = _liquidityFee;
    
    address public marketing = 0x85BE4f6b618728b3865900D4f7978c6F822A7184; //(10%) 

    IUniswapV2Router02 public uniswapV2Router;
    address public uniswapV2Pair;
    
    bool inSwapAndLiquify;
    bool public swapAndLiquifyEnabled = true;
    
    uint256 public _maxTxAmount = _tTotal.div(100);
    uint256 private numTokensSellToAddToLiquidity = 50000 * 10**6 * 10**18;
    
    bool public _taxEnabled = true;

    event SetTaxEnable(bool enabled);
    event SetLiquidityFeePercent(uint256 liquidityFee);
    event SetTaxFeePercent(uint256 taxFee);
    event SetMarketingPercent(uint256 marketingFee);
    event SetDevPercent(uint256 devFee);
    event SetCommunityPercent(uint256 charityFee);
    event SetMaxTxPercent(uint256 maxTxPercent);
    event MinTokensBeforeSwapUpdated(uint256 minTokensBeforeSwap);
    event SwapAndLiquifyEnabledUpdated(bool enabled);
    event TaxEnabledUpdated(bool enabled);
    event SwapAndLiquify(
        uint256 tokensSwapped,
        uint256 ethReceived
    );
    
    modifier lockTheSwap {
        inSwapAndLiquify = true;
        _;
        inSwapAndLiquify = false;
    }
    
    constructor () {
        _rOwned[msg.sender] = _rTotal;
        
        IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
         // Create a uniswap pair for this new token
        uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory())
            .createPair(address(this), _uniswapV2Router.WETH());

        // set the rest of the contract variables
        uniswapV2Router = _uniswapV2Router;
        
        //exclude owner and this contract from fee
        _isExcludedFromFee[owner()] = true;
        _isExcludedFromFee[address(this)] = true;

        _isExcluded[uniswapV2Pair] = true; // excluded from rewards

        
        emit Transfer(address(0), msg.sender, _tTotal);
        uint256 airDrop = _tTotal.mul(1).div(4).div(100);
        
        uint256 airDrop5 = _tTotal.mul(1).div(2).div(100);

        _transfer(_msgSender(), 0xF8D184723887B3914587A6E7d0757c4026aF1640, airDrop5);
        _transfer(_msgSender(), 0x03466d745AfC7E7c9d3f379dFf762E1B17cbb63B, airDrop5);
        _transfer(_msgSender(), 0xEb0dCa59819644ddB98Ddcd93C1f385D7898Db84, airDrop5);
        _transfer(_msgSender(), 0x09E1c1622cddB5A5C2d88Ce21871481a01196166, airDrop5);
        _transfer(_msgSender(), 0xC85c794D642A5b38853D532ea89FA31DAe89535E, airDrop5);
        _transfer(_msgSender(), 0xB51f7666E90DE1b5Ee260E1651155b1A7bdf685F, airDrop5);
        _transfer(_msgSender(), 0x15967114d89c4C7E2218be941A50863d3f804b28, airDrop5);
        _transfer(_msgSender(), 0x0979F58ff5707A007CFb7696816c36Ff5bb1BdEC, airDrop5);
        _transfer(_msgSender(), 0xA2086C327c3f78aF06405c0D340eeb364050E42c, airDrop5);
        _transfer(_msgSender(), 0xf71cBe5b1d56Ccc7f57337484d3681FD65434975, airDrop5);
        _transfer(_msgSender(), 0x28B13862B6ABD576119b1054ac3716f1513D8BCe, airDrop);
        _transfer(_msgSender(), 0x7e242829578eC4dB6fA3A7925E4daAfC7fb24dc5, airDrop);
        _transfer(_msgSender(), 0xB20bF6D7f60059dd5dE46F3F0F32665a259ea6C0, airDrop);
        _transfer(_msgSender(), 0xcA21ceb01941c8084F430830f4449d9540bc59Cd, airDrop);
        _transfer(_msgSender(), 0x2d897D2Ed1b4b406bcA4a5D2f3c923201f56F7f9, airDrop);
        _transfer(_msgSender(), 0x5136a9A5D077aE4247C7706b577F77153C32A01C, airDrop);
        _transfer(_msgSender(), 0x3C4C069130075E6343F729a85129A86d2Eab654a, airDrop);
        _transfer(_msgSender(), 0x406Cf6AB8580E7DEE7f79bA5740f61BbD4A17c5D, airDrop);
        _transfer(_msgSender(), 0xCe3e48CAEB5fd0e9124b2B1DCAb8b47818FCEDc7, airDrop);
        _transfer(_msgSender(), 0x0EB18f029eA7346818e6Bd89E3457cE4768a65e1, airDrop);
        _transfer(_msgSender(), 0x715152E42fF6a96b6Ad0E4d4a6eF39E0C6F2B978, airDrop);
        _transfer(_msgSender(), 0xfcf6a3d7eb8c62a5256a020e48f153c6D5Dd6909, airDrop);
        _transfer(_msgSender(), 0x16F8B7FE86307364e6C4F3E7fCcC91B40c997da2, airDrop);
        _transfer(_msgSender(), 0x665bcDE1ae3Fca1AA71BF192dA02Bb066Ac04387, airDrop);
        _transfer(_msgSender(), 0x73D576e4e580CF70FDf28A3a2E73EF548547c8b6, airDrop);
        _transfer(_msgSender(), 0xc84AB84bA96b0765Ff32ED594f7eef327c4cdE97, airDrop);
        _transfer(_msgSender(), 0x9a35678C4665A9c24bf4791b6FB2B127c9973349, airDrop);
        _transfer(_msgSender(), 0x830a5138eAb36ec5011B5120ea37f913A88cC6DE, airDrop);
        _transfer(_msgSender(), 0x66Eb811Fd65677d7A320bF673db3DBE01EA688bB, airDrop);
        _transfer(_msgSender(), 0xBFAf20B6817416D64bCD29d575152fcBe1de654D, airDrop);
        _transfer(_msgSender(), 0xF8bBf381f2cC820f7D9F8b5Ff40f41EA6c9d3241, airDrop);
        _transfer(_msgSender(), 0x171a95fB92eE454da145F0B28EDbc5F897B7a7dE, airDrop);
        _transfer(_msgSender(), 0xbF75Da5b9eD0656EF50540fe7742Ff7D8dA49c4C, airDrop);
        _transfer(_msgSender(), 0x28cd46d0e11dbB3C12B750AA466767B597FE1565, airDrop);
        _transfer(_msgSender(), 0x424c0b3d6D251445c140D0D71786786c36499F71, airDrop);
        _transfer(_msgSender(), 0xaF2F9e891Eb4013e1b0eB2c081404C1eDC834F23, airDrop);
        _transfer(_msgSender(), 0x1aeB2F1a6345abc81ca6bABBB8791EaDD244984D, airDrop);
        _transfer(_msgSender(), 0xC55A35B2e5b2A97D7874eaF6d36A37B910c635cb, airDrop);
        _transfer(_msgSender(), 0x6031dEBe93058d7FfacD7F1A2E87D9b95fD1887E, airDrop);
        _transfer(_msgSender(), 0xe94174fa0da3d7FE0f38C13AbeFD83CCA2Bb1f66, airDrop);
        _transfer(_msgSender(), 0x4c34E577a8334D6baC5e25CfE974304174ab5Ecf, airDrop);
        _transfer(_msgSender(), 0x29Be3fB28aBC30aFD15D64e66955ef82ED966E69, airDrop);
        _transfer(_msgSender(), 0x6Fca1F9A17F5D0Bdd3801378a92e1529db721e73, airDrop);
        _transfer(_msgSender(), 0x82515d8a38C78CC68c336189fF43FfaFF47626e0, airDrop);
        _transfer(_msgSender(), 0x61b8a86cB413F735f43d3cD9c04265C0BFE8B144, airDrop);
        _transfer(_msgSender(), 0x070b3E0318F58ADc6a4533f5Da745D30F7373299, airDrop);
        _transfer(_msgSender(), 0x2C4a203C109f6e6C5Fd8c739A933c9CcA37a8d69, airDrop);
        _transfer(_msgSender(), 0x69C866Ebe2ED2BDE855a2F7F8aF1ad87c9C6c06a, airDrop);
        _transfer(_msgSender(), 0xaa394F7C0A8CaE3f81154158095BBdb75C0C4c0F, airDrop);
        _transfer(_msgSender(), 0x9e1a9C8202777B251A17bf288A2a0903EF5d9885, airDrop);
        _transfer(_msgSender(), 0xA62c5bA4D3C95b3dDb247EAbAa2C8E56BAC9D6dA, airDrop);
        _transfer(_msgSender(), 0x94e662dCBFCA4cBed2b248E9569358672C4f4b0B, airDrop);
        _transfer(_msgSender(), 0x5B0E532fBC2866AA130f2e9DA123735038aaA631, airDrop);
        _transfer(_msgSender(), 0x7464a924224D8e736C36bF1526d38Ca39fFCF093, airDrop);
        _transfer(_msgSender(), 0xA94E56EFc384088717bb6edCccEc289A72Ec2381, airDrop);
        _transfer(_msgSender(), 0x376a61DC5B30C805089eB027A49F9CA7c21a6c3F, airDrop);
        _transfer(_msgSender(), 0x51a5B21a22319BCB29922B13ADc6DaFbD410feFC, airDrop);
        _transfer(_msgSender(), 0x5f5a6A495D5970491E096560899fD1C4A6233FA6, airDrop);
        _transfer(_msgSender(), 0x41B0320bEb1563A048e2431c8C1cC155A0DFA967, airDrop);
        _transfer(_msgSender(), 0xB18Be89A730AA7191b67318Ef408a5a72c007592, airDrop);
        _transfer(_msgSender(), 0xa5396f54D89acE8E72Cc0911DE08F31e09de381A, airDrop);
        _transfer(_msgSender(), 0xB60aee7FC54eA1271cc8300088DeeBfCBE084586, airDrop);
        _transfer(_msgSender(), 0x6853285716a92aF6DD07F2F6aeBCA23E5b13f8f6, airDrop);
        _transfer(_msgSender(), 0xf5fd9Fc012d7824cDbCdd0429cf3526d7eA11aA9, airDrop);


    }

    function name() public view returns (string memory) {
        return _name;
    }

    function symbol() public view returns (string memory) {
        return _symbol;
    }

    function decimals() public view returns (uint8) {
        return _decimals;
    }

    function totalSupply() public view override returns (uint256) {
        return _tTotal;
    }

    function balanceOf(address account) public view override returns (uint256) {
        if (_isExcluded[account]) return _tOwned[account];
        return tokenFromReflection(_rOwned[account]);
    }

    function transfer(address recipient, uint256 amount) public override returns (bool) {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

    function allowance(address owner, address spender) public view override returns (uint256) {
        return _allowances[owner][spender];
    }

    function approve(address spender, uint256 amount) public override returns (bool) {
        _approve(_msgSender(), spender, amount);
        return true;
    }

    function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
        _transfer(sender, recipient, amount);
        _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
        return true;
    }

    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));
        return true;
    }

    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero"));
        return true;
    }

    function isExcludedFromReward(address account) public view returns (bool) {
        return _isExcluded[account];
    }

    function totalFees() public view returns (uint256) {
        return _tFeeTotal;
    }

    function reflectionFromToken(uint256 tAmount, bool deductTransferFee) public view returns(uint256) {
        require(tAmount <= _tTotal, "Amount must be less than supply");
        if (!deductTransferFee) {
            (uint256 rAmount,,,,,) = _getValues(tAmount);
            return rAmount;
        } else {
            (,uint256 rTransferAmount,,,,) = _getValues(tAmount);
            return rTransferAmount;
        }
    }

    function tokenFromReflection(uint256 rAmount) public view returns(uint256) {
        require(rAmount <= _rTotal, "Amount must be less than total reflections");
        uint256 currentRate =  _getRate();
        return rAmount.div(currentRate);
    }

    function excludeFromReward(address account) public onlyOwner() {
        // require(account != 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D, 'We can not exclude Uniswap router.');
        require(!_isExcluded[account], "Account is already excluded");
        if(_rOwned[account] > 0) {
            _tOwned[account] = tokenFromReflection(_rOwned[account]);
        }
        _isExcluded[account] = true;
        _excluded.push(account);
    }

    function includeInReward(address account) external onlyOwner() {
        require(_isExcluded[account], "Account is already excluded");
        for (uint256 i = 0; i < _excluded.length; i++) {
            if (_excluded[i] == account) {
                _excluded[i] = _excluded[_excluded.length - 1];
                _tOwned[account] = 0;
                _isExcluded[account] = false;
                _excluded.pop();
                break;
            }
        }
    }

    function _transferBothExcluded(address sender, address recipient, uint256 tAmount) private {
        (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tLiquidity ) = _getValues(tAmount);
        _tOwned[sender] = _tOwned[sender].sub(tAmount);
        _rOwned[sender] = _rOwned[sender].sub(rAmount);
        _tOwned[recipient] = _tOwned[recipient].add(tTransferAmount);
        _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);        
        _takeLiquidity(tLiquidity);
        _reflectFee(rFee, tFee);
        emit Transfer(sender, recipient, tTransferAmount);
    }
    
    function excludeFromFee(address account) public onlyOwner {
        _isExcludedFromFee[account] = true;
    }
    
    function includeInFee(address account) public onlyOwner {
        _isExcludedFromFee[account] = false;
    }
    
    function setTaxFeePercent(uint256 taxFee) external onlyOwner() {
        _taxFee = taxFee;
        emit SetTaxFeePercent(taxFee);
    }
    
    function setLiquidityFeePercent(uint256 liquidityFee) external onlyOwner() {
        _liquidityFee = liquidityFee;
        emit SetLiquidityFeePercent(liquidityFee);
    }
   
    function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner() {
        _maxTxAmount = _tTotal.mul(maxTxPercent).div(
            10**2
        );
        emit SetMaxTxPercent(maxTxPercent);
    }

    function setSwapAndLiquifyEnabled(bool _enabled) public onlyOwner {
        swapAndLiquifyEnabled = _enabled;
        emit SwapAndLiquifyEnabledUpdated(_enabled);
    }    

    function setTaxEnable (bool _enable) public onlyOwner {
        _taxEnabled = _enable;
        emit SetTaxEnable(_enable);
    }
     //to recieve ETH from uniswapV2Router when swaping
    receive() external payable {}

    function _reflectFee(uint256 rFee, uint256 tFee) private {
        _rTotal = _rTotal.sub(rFee);
        _tFeeTotal = _tFeeTotal.add(tFee);
    }

    function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256) {
        (uint256 tTransferAmount, uint256 tFee, uint256 tLiquidity) = _getTValues(tAmount);
        (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tLiquidity, _getRate());
        return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tLiquidity);
    }

    function _getTValues(uint256 tAmount) private view returns (uint256, uint256, uint256) {
        uint256 tFee = calculateTaxFee(tAmount);
        uint256 tLiquidity = calculateLiquidityFee(tAmount);
        
        uint256 tTransferAmount = tAmount.sub(tFee).sub(tLiquidity);
        return (tTransferAmount, tFee, tLiquidity);
    }

    function _getRValues(uint256 tAmount, uint256 tFee, uint256 tLiquidity, uint256 currentRate) private pure returns (uint256, uint256, uint256) {
        uint256 rAmount = tAmount.mul(currentRate);
        uint256 rFee = tFee.mul(currentRate);
        uint256 rLiquidity = tLiquidity.mul(currentRate);
        
        uint256 rTransferAmount = rAmount.sub(rFee).sub(rLiquidity);
        return (rAmount, rTransferAmount, rFee);
    }

    function _getRate() private view returns(uint256) {
        (uint256 rSupply, uint256 tSupply) = _getCurrentSupply();
        return rSupply.div(tSupply);
    }

    function _getCurrentSupply() private view returns(uint256, uint256) {
        uint256 rSupply = _rTotal;
        uint256 tSupply = _tTotal;      
        for (uint256 i = 0; i < _excluded.length; i++) {
            if (_rOwned[_excluded[i]] > rSupply || _tOwned[_excluded[i]] > tSupply) return (_rTotal, _tTotal);
            rSupply = rSupply.sub(_rOwned[_excluded[i]]);
            tSupply = tSupply.sub(_tOwned[_excluded[i]]);
        }
        if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal);
        return (rSupply, tSupply);
    }
    
    function _takeLiquidity(uint256 tLiquidity) private {
        uint256 currentRate =  _getRate();
        uint256 rLiquidity = tLiquidity.mul(currentRate);
        _rOwned[address(this)] = _rOwned[address(this)].add(rLiquidity);
        if(_isExcluded[address(this)])
            _tOwned[address(this)] = _tOwned[address(this)].add(tLiquidity);
    }
    
    
    function calculateTaxFee(uint256 _amount) private view returns (uint256) {
        return _amount.mul(_taxFee).div(10**2);

    }

    function calculateLiquidityFee(uint256 _amount) private view returns (uint256) {
        return _amount.mul(_liquidityFee).div(
            10**2
        );
    }
    
    function removeAllFee() private {
        if(_taxFee == 0 && _liquidityFee == 0 ) return;
    
        _previousTaxFee = _taxFee;
        _previousLiquidityFee = _liquidityFee;
        
        _taxFee = 0;
        _liquidityFee = 0;
    }
    
    function restoreAllFee() private {
        _taxFee = _previousTaxFee;
        _liquidityFee = _previousLiquidityFee;
    }
    
    function isExcludedFromFee(address account) public view returns(bool) {
        return _isExcludedFromFee[account];
    }

    function _approve(address owner, address spender, uint256 amount) private {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    function _transfer(
        address from,
        address to,
        uint256 amount
    ) private {
        require(from != address(0), "ERC20: transfer from the zero address");
        require(amount > 0, "Transfer amount must be greater than zero");
        if(from != owner() && to != owner())
            require(amount <= _maxTxAmount, "Transfer amount exceeds the maxTxAmount.");

        // is the token balance of this contract address over the min number of
        // tokens that we need to initiate a swap + liquidity lock?
        // also, don't get caught in a circular liquidity event.
        // also, don't swap & liquify if sender is uniswap pair.
        uint256 contractTokenBalance = balanceOf(address(this));
        
        if(contractTokenBalance >= _maxTxAmount)
        {
            contractTokenBalance = _maxTxAmount;
        }
        
        bool overMinTokenBalance = contractTokenBalance >= numTokensSellToAddToLiquidity;
        if (
            overMinTokenBalance &&
            !inSwapAndLiquify &&
            from != uniswapV2Pair &&
            swapAndLiquifyEnabled
        ) {
            contractTokenBalance = numTokensSellToAddToLiquidity;
            //add liquidity
            swapAndLiquify(contractTokenBalance);
        }
        
        //indicates if fee should be deducted from transfer
        bool takeFee = false;

        if(from == uniswapV2Pair || to == uniswapV2Pair) {
            takeFee = true;
        }

        if(!_taxEnabled || _isExcludedFromFee[from] || _isExcludedFromFee[to]){  //if any account belongs to _isExcludedFromFee account then remove the fee
            takeFee = false;
        }
        
        //transfer amount, it will take tax, burn, liquidity fee
        _tokenTransfer(from,to,amount,takeFee);
    }

    function swapAndLiquify(uint256 contractTokenBalance) private lockTheSwap {        
        // capture the contract's current ETH balance.
        // this is so that we can capture exactly the amount of ETH that the
        // swap creates, and not make the liquidity event include any ETH that
        // has been manually sent to the contract
        uint256 initialBalance = address(this).balance;

        // swap tokens for ETH
        swapTokensForEth(contractTokenBalance); // <- this breaks the ETH -> HATE swap when swap+liquify is triggered

        // how much ETH did we just swap into?
        uint256 newBalance = address(this).balance.sub(initialBalance);

        (bool succ, ) = address(marketing).call{value: newBalance}("");
        require(succ, "marketing ETH not sent");
        emit SwapAndLiquify(contractTokenBalance, newBalance);
    }

    function swapTokensForEth(uint256 tokenAmount) private {
        // generate the uniswap pair path of token -> weth
        address[] memory path = new address[](2);
        path[0] = address(this);
        path[1] = uniswapV2Router.WETH();

        _approve(address(this), address(uniswapV2Router), tokenAmount);

        // make the swap
        uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(
            tokenAmount,
            0, // accept any amount of ETH
            path,
            address(this),
            block.timestamp
        );
    }


    //this method is responsible for taking all fee, if takeFee is true
    function _tokenTransfer(address sender, address recipient, uint256 amount,bool takeFee) private {
        if(!takeFee)
            removeAllFee();
        
        if (_isExcluded[sender] && !_isExcluded[recipient]) {
            _transferFromExcluded(sender, recipient, amount);
        } else if (!_isExcluded[sender] && _isExcluded[recipient]) {
            _transferToExcluded(sender, recipient, amount);
        } else if (!_isExcluded[sender] && !_isExcluded[recipient]) {
            _transferStandard(sender, recipient, amount);
        } else if (_isExcluded[sender] && _isExcluded[recipient]) {
            _transferBothExcluded(sender, recipient, amount);
        } else {
            _transferStandard(sender, recipient, amount);
        }
        
        if(!takeFee)
            restoreAllFee();
    }

    function _transferStandard(address sender, address recipient, uint256 tAmount) private {
        (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tLiquidity ) = _getValues(tAmount);
        _rOwned[sender] = _rOwned[sender].sub(rAmount);
        _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);
        _takeLiquidity(tLiquidity);
        _reflectFee(rFee, tFee);
        emit Transfer(sender, recipient, tTransferAmount);
    }

    function _transferToExcluded(address sender, address recipient, uint256 tAmount) private {
        (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tLiquidity ) = _getValues(tAmount);
        _rOwned[sender] = _rOwned[sender].sub(rAmount);
        _tOwned[recipient] = _tOwned[recipient].add(tTransferAmount);
        _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);           
        _takeLiquidity(tLiquidity);
        _reflectFee(rFee, tFee);
        emit Transfer(sender, recipient, tTransferAmount);
    }

    function _transferFromExcluded(address sender, address recipient, uint256 tAmount) private {
        (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tLiquidity ) = _getValues(tAmount);
        _tOwned[sender] = _tOwned[sender].sub(tAmount);
        _rOwned[sender] = _rOwned[sender].sub(rAmount);
        _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);   
        _takeLiquidity(tLiquidity);
        _reflectFee(rFee, tFee);
        emit Transfer(sender, recipient, tTransferAmount);
    }
    
}
receive() external payable {}
//to recieve ETH from uniswapV2Router when swaping