change values Xn and X