use templates for index