changed the bug for loop through the grid
working version of simulation, but cooling seems not very good
merge conflict resolved