reformatted a quicker dijkstra

still doesn't work most of the time, is acting weirdly.