Added flip flop stuff