generalize path