Solutions for chapter 7 exercises