parallel tree building