fixed bug in id3 function where only unique items were passed to mostCommon