converting async windows to TemplateReference