Finished Exercise 6.