Nwe tool for smoothing function