smoothing functions added sorry for no including