simplify nameserver logic and use simple grep options