update example.py code in Example conforming to example.py