Refactored isGenerated