work on invariant preservation for repl_correct