some improvements to program.py