jscript optimization, search feature ok