patched version of clarity for replay analysis