refactoring of list.jinja2 template