exercise 3 solution