solve exercises 17.20 - 17.21