added a more robust isRegen