made the tests more robust