exercise 2.46 completd