Update mm.c: some feature added