added template code to index