Exercise 17 modified