almost complete ID3 decision tree builder