build tree done