exercise 3.17 done