Changed the code to use the new flag var in the struct idlist instead