changed i, j -> row, column