run SPA with a modified flow.py function. This might need to be reverted later