rewrite builder, use jinja2