```\\nfunction _takeTax(\\n    address _from,\\n    address _to,\\n    uint256 _amount\\n) internal returns (uint256) {\\n    if (whitelisted[_from] || whitelisted[_to]) {\\n        return _amount;\\n    }\\n    uint256 totalTax = transferTaxes;\\n\\n    if (_to == pairAddress) {\\n        totalTax = sellTaxes;\\n    } else if (_from == pairAddress) {\\n        totalTax = buyTaxes;\\n    }\\n\\n    uint256 tax = 0;\\n    if (totalTax > 0) {\\n        tax = (_amount * totalTax) / 1000;\\n        super._transfer(_from, address(this), tax);\\n    }\\n    return (_amount - tax);\\n}\\n```\\n