script to create index page