added dijkstra to find parent-child