make TypeAndClassifier serializable