adjusting grid for nesting