re-write index page