a helper function would be nice so we don't need to write JS up in our nunjucks