use amd only if needed