all the problems due to huffman tree fixed