prepare for MMatrix