search algorithm works with namere.py code