wrote getChallenges() method