solutions to chapter 6 exercises