add some code in demo.py