changed huffman tree to independent data types