add smothing algorithm