discretize: minor refactoring
discretize: option to save snapshots