added smoothing function to simulator