tinkering with the smoothing code