Add logic for next iteration of grid