ID data structure changed  to tree from linear