updated template with a button and regen index.