add tests and fix pictures