solve exercises 4.26 - 4.30