updating capital after buying/selling