Added huffman coding