Updated the Jacobi so it now works with a 1d Array representing a 2d Array