first pass at modified huffmancode for commitment tree construction