Finished ch8 with passing tests