adding in huffman tree encoding for training vocabulary...in progress