refactor interface for classification