private Arc pairToArc( Pair p, HashMap<Pair,Arc> pnts, 
		HashMap<Pair,Arc> kids )
	{
		nArcs++;
		char[] pData = (p.isChild()||p.isHint())?null:p.getChars();
		Arc a = new Arc( cloneVersions(p.versions), pData );
		if ( p.isChild() )
		{
			// we're a child - find our parent
			Pair parent = p.getParent();
			Arc b = pnts.get( parent );
			if ( b != null )
			{
				b.addChild( a );
				// if this is the last child of the parent remove it
				if ( b.numChildren() == parent.numChildren() )
					pnts.remove( parent );
			}
			else	// we're orphaned for now
				kids.put( p, a );
		}
		else if ( p.isParent() )
		{
			ListIterator<Pair> iter = p.getChildIterator();
			while ( iter.hasNext() )
			{
				Pair child = iter.next();
				Arc r = kids.get( child );
				if ( r != null )
				{
					a.addChild( r );
					kids.remove( child );
				}
			}
			if ( p.numChildren() > a.numChildren() )
				pnts.put( p, a );
		}
		return a;
	}