renamed flipflop to toggle