adding end of tree