updated runSearch.js