some changes in search.py