Added the exercise 172; user-made functions as a switch instead of if/else