Hugo Template Range Loop Every N Items

OK, I found this:

Now my code is:

{{ $pages := where .Data.Pages "Section" "event" }}
{{ $pages_count := len $pages }}
{{ if ge $pages_count 1 }}
{ range $i, $sorted := $pages.ByParam "start" }}
<div class="event-card__title"><a href="{{ .URL }}" title="{{ .Title }}">{{ .Title }}</a></div>
  {{ if modBool $i 3 }}
    </div> <!-- end row -->
    <div class="row">
  {{ end }}
{{ end }}

But it is adding a row after the first and then every 3 after that.

1
2 3 4
5 6