Median

Added a median function