migrating modules to AMD