use for_each_safe to allow Kill to remove the node from the list