query deletion mostly working