add histogram.median method