resolved #2 added a function mean() to mm.c