added calculate total