solve exercises 17.12 - 17.14