Move logic into the experiment code