solve exercise 27.12