remove kinda unpythonic set_run_function