added QueryTemplate