fixed median letter iteration