finished chapter 5 exercises