added lmm.cpp