Addded calculation of means to the mappers