jinja stuff and modified index