dnc: handle sig int
code cleanup