working on jacobian code