refactor AllowExtension