solve exercises 9.6 - 9.8