added median of three