version of run_experiment which works on linux