descendants().filter(d => d.depth <= 1).map(d => d.data.name))
                .range(d3.schemeCategory10);

            g.selectAll("path")
            .data(root.links())
            .join("path")
            .attr("fill", "none")
            .attr("stroke", "black")
            .attr("stroke-width", 1.5)
            .attr("d", d3.linkVertical().x(d => d.x).y(d => d.y));

            // alternatively, we can use the following code to do a single data-join; 
            // then, use .append() to add circle