some work done on updateGrid