Updates:
Now made the data stored in a temporary hash table so that the variable doesn\'t receive an error if the list gets lengthy.