adding better handling of DND