made the tests work
code clean up