patches 2 for search func