changes in CreateQuery1()