wrote a bunch of tests, found a lot of bugs, fixed them (I think, some are hard to check), need to write report a never see this again