tests and fix
more stuff and tests