huffman implementation finished