solve exercises 13.22 - 13.24