solve exercises 7.1 - 7.3