use template for index