fixed 3_1 so that we can pass different xEE weights and determines avg phdiff