updated for grid