Implementation of a flip flop time series smoother