remove delete; it didn't reclaim any memory anyway.  rename search2 to search_local