solve exercises 4.2 - 4.6