Adding first smoothing functionality