refactor: add ideq(), and use ideq to eliminate some regeneration key diff