Adapt experiment code