Added profit calculation