fixed tests for the refactoring