fixed tests after refactoring