fixing up exercise 3.16