renamed from newX newY to nextRow and nextCol