Refactored code -- Iterated through IDs instead of writing them out one by one.