chapter 4 done, one memory leak found, fixed