minor modification to master.py