How to iterate through a custom state list?