Adds median method and tests for math methods