merge Totals into master
 merge totals backend code