added getTemplate method.