change variable matrix to m