refactoring classifier