make smoothing function
declared smoothing algo