dijkstra, broken
dijkstra was fine, heap is crap

todo: rewrite heap from scratch instead of using someone else's