updated the ising model in 2D code