Solve exercises 39-43