add option for savgol filter