rewrite index.html and use jinja2 templates