add dx, dxy, dB3D variables, which was not updated here