created showSummary function