partial method to make huffman tree