adding support for removing results when query is empty