added code for exp4