Implement AMWG function