jinja apparently doesn't recognize next()