factor out appending to judgement trail
switch to a flattened representation of the judgement trail