solve exercises 10.7 - 10.10