basic framework for huffman