Finished Chapter 6 exercises