Add calculate total helper.