changed to using templateCache