finish the assignment for chapter 3