creating a tree using d3.js