Completed chapter 6 exercises to add more tests