solve exercises 18.24 - 18.25