Completed Exercise 5.8