refactor ajax search to use .get