lots of test cases and some more logging