adds search functionality through AJAX/JS