change the dynamic query