run.py improved