solve exercise 20.22