solutions to chapter 3 exercises