chapter 5 exercises 5.10 -> 5.18