tree structure changes for id3 algorithm