some refactoring on the test file