adding query class