solve exercise 50.04