improved treegraph