modified tree creation