using generators to load templates into the host app