fixed search func