added profit calculation testing