fix and simplify tests