r796: more debugging code