refactoring some tests