convert calls to addStep in factory.py to use instances