revised Mean and Median computations