```\nuint256 barBeforeBalance = bar.balanceOf(address(this));\nuint256 sushiBeforeBalance = sushi.balanceOf(address(this));\n\nbar.leave(requiredShares);\n\nuint256 barAfterBalance = bar.balanceOf(address(this));\nuint256 sushiAfterBalance = sushi.balanceOf(address(this));\n\nuint256 barBalanceDiff = barBeforeBalance.sub(barAfterBalance);\nuint256 sushiBalanceDiff = sushiAfterBalance.sub(sushiBeforeBalance);\n\nbalances[msg.sender] = balances[msg.sender].sub(barBalanceDiff);\n```\n