Add code to upadate totals.