I added a median function

Pretty self explanatory.