Correct classifier algorithm