Changed variable clazz to desiredClass, to be more descriptive