debugging median filter wrong and wait for fixing