simple implement of amd.