Updated mm.c with code from project.