added median filter for ultrasonic