smoothing script