index page function created