fixed broken refactoring