When this code receives a response from the server the code runs 2-3 times even if the totalPrice has not changed which means that the code within the "//