cleanup for chapter 3