Median

Added a median function 
Probably don't want to change this...