added getMatrix()