private void connectRemoteServices(final Map<Service, Set<ServiceDistance>> detectedConnections, final PeerID collDetectionNode, final Map<Service, Set<ServiceDistance>> newSuccessors, final Map<Service, Set<ServiceDistance>> newAncestors) {
		final Set<ServiceDistance> addedServices = new HashSet<ServiceDistance>();
		
		for (final Iterator<Entry<Service, Set<ServiceDistance>>> it = detectedConnections.entrySet().iterator(); it.hasNext();) {
			final Entry<Service, Set<ServiceDistance>> entry = it.next();
			final Service service = entry.getKey();
			if (containsLocalService(service))
				addedServices.addAll(sdg.connectServices(service, entry.getValue(), collDetectionNode));
		}
			
		for (final ServiceDistance addedService : addedServices) {
			for (final ServiceDistance ancestor : sdg.getLocalAncestors(addedService.getService())) {
				if (!newSuccessors.containsKey(ancestor.getService()))
					newSuccessors.put(ancestor.getService(), new HashSet<ServiceDistance>());
				newSuccessors.get(ancestor.getService()).add(addedService);
			}
			
			for (final ServiceDistance successor : sdg.getLocalSuccessors(addedService.getService())) {
				if (!newAncestors.containsKey(successor.getService()))
					newAncestors.put(successor.getService(), new HashSet<ServiceDistance>());
				newAncestors.get(successor.getService()).add(addedService);
			}
		}
	}