added code for experiment 3