fixed wrong table parsing, added table tests
more tests; randomized test now does not fail