meh
working stuff
added the tests, refactored some things