GRID: coded and refactored rows, columns and boxes