wired up template generation