added iterative Jacobi method