code for the median filter program