updates to shortest path.  added some performance improvements