adding code to index file