wrapping up run_ps