getUsedStates is now unordered_set