generalized path stuff