Node splitArcAt( Node n, short version, int pos, int offset,
        boolean atStart ) throws Exception
	{
		Arc a = null;
		Node splitNode = null;
		Node orig = n;
		while ( n != end )
		{
			a = n.pickOutgoingArc( version );
			if ( pos+a.dataLen() < offset || (!atStart && pos+a.dataLen()
				== offset) )
			{
                pos += a.dataLen();
                n = a.to;
            }
            else 
                break;
		}
		if ( a != null )
		{
            if ( offset == pos )
			{
				if ( atStart )
					splitNode = a.from;
				else if ( n != orig )
					splitNode = n;
				else
					splitNode = n.split();
			}
			else if ( a.dataLen()+pos == offset )
				splitNode = a.to;
			else
			{
				Arc[] pair = a.split( offset-pos );
				splitNode = pair[0].to;
			}
		}
        else
            throw new MVDException("could not find arc at offset "
                +offset+" in version "+version );
		return splitNode;
	}