solve exercises 6.3 - 6.10