fixed tests (todo: more tests)