some init-state code for nondeterministic inits (not included, not tested)