refactor all tests