modified tree js