added AAM calculation