starting tree functionality