set up clearTotals function for firebase