answer for ex 5
exercise 6