#27 moved grid update routine