revised spreadsheet to aggregate aggregate functions for external use.