added a utility to rebuild terms from the heap
just noticed there may be a bug in the output of the machine