move index to template