tree and huffman coding implemented, not tested