fixed incorrect expansion bug, trying submatrix