added buildSummary method

Makes it easier to use custom logic to build the summary