change in query formulation algorithm