Fix e2e; add template function to make this possible

Running e2e now to make sure this fixes it.
comment above is out of date now - it explains "index"