algos run and find shortest path, need to clean and refactor