Finished Chapter 5 exercises