add run_locally support