edit AM.php