add amd. change code style