refactor revenue and vendor_totals methods