fix incomplete refactoring