finished ch6. To do: add a readme for it later.