ID3 impelemntation - contains bugs