tested with demo01.py and reupdated final.pl