infer type