refactoring of ClassificationResult