Wrong output of AM
create_am corrected
Files added and modified