modified for space delimited id list