updating grid class