Added profit calculation and percent error output