added a finish method to print summary