fixed problem with solution to Exercise 5