Made Functions return path array of nodes