use Quine.StateVar and cleanup