simplify theClass in magic part