complete the code of build tree