infer types