Auto-generating main lambda