exercise 3.39 done