So what is the algorithm for detecting different CLASSES like what should my metadata be for class2 or class3? Can you point me through the code?