Added query echo to template