moved the smoothing functions to their own file