builds decision tree using ID3 algorithm