updates smoothing tool using vectorized loops