refactoring classifier conditions