Finished ecperiment code