solve exercise 50.02