added dict lookup for templates