auto path prefix finding