debug the part of calculation variance