finished showSummary function