device discard function