templating with amd helper