solve exercises 2.23 - 2.25