crucial bug? >2 should be >=2 for 2-bit state machine