some tests refactoring