remove amd definition; adjust global context