added simple smoothing