solve exercise 14.2