solve exercise 42.10