add tests a little later, still got some bugs and code is quite messy