amd/cmd support, and add test