Create AndSearch function