Delete By Query API
refactoring