Refactored print_cohort method