getSearch function defined