added huffman coding