exercise 3 modified