new grid change function