added query deletion support
simple count bug fixed