tests for chapter 2