Adding a basic median function

I have added a median function for the whole group to start using.

I don't have tests yet, so don't yell at me.