delete unused function
add the function for auto search