degub the run_wf part; not finalized though.
Need ipython to test; will do that tomorow.