submatrix testing