updated smoothing filterfunction