Changed name of checkRow -> checkIndex. Since this function is checking an index.