add shortest path and restructure visibility graph