exercise 3.18 done