update smoothing function