finish the assignment for chapter 5