calculation of Jacobian