updated ising.c with bisht's comments