Mode gen and Counter revision