new java huffman code working