Added possibility of getting totals