index template building