solve exercises 16.7 - 16.9