passing objects to TemplateManager