added options for managing template context