Updated for Exercise 5.