another basic unittest
lots of improvments
major refactor