changed variable name from idx to classifier.