updated functions to make summary table (for loops run locally rather than off of the source file