solve exercises 10.19 - 10.21