added the better algo for 2D Ising model. Working version!