First search function done