worked on iterative method of Jacobi