changed ai.php