smoothing out output