implements object querying and deletion by query