stateful queue