updating subtotals