to take opt.idAttribute in tree.add method