updated to work with newer net-dns api