Adding this for use with a dijkstra problem shortly.