Adds median() method