Extract body of loop to update_item_quality