yay got shortest path algorithm working :)