solve exercises 20.23 - 20.24