Completed Chapter 5 exercises