Created new table to track total funding by categories, refactored code to function