updated demo.py