the modify query func