encapsulate stuff in run.py