initial query cancelation implementation