new monkey patching for template rendering