removed duplicate dns removal and break from loop