working through chapter 9 exercises