add totals endpoint