added median to statistics