implemented huffman ex3