new median

Hey!
some changes made*
no docstring (just as part of the exercise)