implement HuffmanTree* (untested)