huffman handles input