Updated to calculate the correct total price.