added in bettter support for template generators