solve exercises 12.12 - 12.14