Median

added median function!