more work on analytical jacobian