codes for experiment