Added query class