Updated with the AI integration