Exercises 3.16, 3.17, 3.18 resolved