Median function works!