do: rework templates and how they are used in .index