exercise 4 solution