Solved chapter 21 exercises