[aml] refactor resolution handling