search alg impl done
small improvements