solve exercises 16.5 - 16.6