Got totals working