solve exercises 2.26 - 2.27