refactored Analysis.Infer