more elegant jacobian calculation
more elegant jacobian calculation