answer for exercise 6