solve exercises 12.2 - 12.5