renamed klass to clazz, seems to be more common