added template cache