solve exercises 16.21 - 16.22