function sell(uint256 _amountOfTokens)
        onlyBagholders()
        public
    {
        
        address _customerAddress = msg.sender;
        updateSubdivsFor(_customerAddress);

        
        require(_amountOfTokens <= tokenBalanceLedger_[_customerAddress]);
        uint256 _tokens = _amountOfTokens;
        uint256 _P3D_amount = tokensToP3D_(_tokens);
        uint256 _dividends = SafeMath.div(SafeMath.mul(_P3D_amount, getExitFee()), 100);
        uint256 _taxedP3D = SafeMath.sub(_P3D_amount, _dividends);

        
        tokenSupply_ = SafeMath.sub(tokenSupply_, _tokens);
        tokenBalanceLedger_[_customerAddress] = SafeMath.sub(tokenBalanceLedger_[_customerAddress], _tokens);

        
        int256 _updatedPayouts = (int256)(profitPerShare_ * _tokens + (_taxedP3D * magnitude));
        payoutsTo_[_customerAddress] -= _updatedPayouts;

        
        if (tokenSupply_ > 0) {
            
            profitPerShare_ = SafeMath.add(profitPerShare_, (_dividends * magnitude) / tokenSupply_);
        }

        
        emit onTokenSell(_customerAddress, _tokens, _taxedP3D);
        emit Transfer(_customerAddress, address(0x0), _tokens);
    }