compute Median methods