promise templating