failed refactoring fixed