solve exercises 9.18 - 9.19