update index and template