change the m2.cpp to distinguish the mode of parameter