solve exercises 7.4 - 7.6