related ids and deletion