solve exercise 20.27