solve exercises 7.7 - 7.10