search() from common.py/esFac improved