voclass query refactoring