solve exercises 13.17 - 13.18