finished the calculation of total price.