refactoring (window search)