path object holds list of nodes in a path