Median function works!!!