example.py prototype for search