data is able to populated for getting edgeTo and distTo