Added code for infer path problem