Mor efficient tree creation