Added logic to display nodes that are part of the shortest path.