connects local nodes correctly