work on search

rework of the #609