using dns updated code