Complete search.py (a half)