Implemented smoothing