LCTHW Exercise 14: Reduced the number of functions down to one