partially fixed live-demo.py