added smoothing capabilities