Edited to read idlist directly