Completed chapter 9, documentation to be added later