refactor row-col-grid method