Add solution to exercise 16