fixed failing tests after refactoring