add totals to table