added median output