fixing refactoring