infer class