add logic for drop down class totals and fix assistance in query