refactoring fails