added post on profit calculation