add query class