fixed refactoring mistake