added search for templates and tasks