added ami as variable