updating Exercise 4