updated user search algorithm