update median filter