added new query formulation method