REGEN: for release mode