Exercise 8: defined new mothod to get user cohort input