build tree step2