solve exercises 9.14 - 9.17