slightly more agnostic state recorder