solve exercise 42.12