change API to allow for named templates