rename state var names s/queueState/loopState/g