search: added debug mode