answered exercise 6