correction after refactoring