solve exercises 15.18 - 15.20