seems like `{% if max_num == 1 %}` and then switching the branches would be simpler