Had taken input for methods (i, j) to mean (x, y) whereas autograder takes to mean (row, column) i.e. (y, x), so was failing some tests - think have fixed now.