solve exercises 17.4 - 17.6