implemented flip flop smoother