added summarize results function