Modified new experiment code