introduce query class