Search in JS #4 refactoring