Recording IDs of all items on a line instead of just the last