improved dns-sync algorytm