fix previous refactoring