Added AWM code as starting point