solutions to chapter 2 exercises