add dns function

unfinished