complete sampleSummaries function