modify to keep track of which row and column scanner is at