getting device id for deletion instead of array number"