A queue crunching state machine