working to get shortest path and output to folder