edited getTotalPrice method