Yes! you got it!
And, I hope that what you help me with, I will be able to translate that template to be able to enter a chain, and then getting all the unique states that chain is in
Thanks AB33!