more tests refactoring