modified code for exp1 and exp2