changed position of '_AMD' variable declaration