solve exercises 3.2 - 3.5