solve exercises 17.2 - 17.3