solve exercise 14.27