reworking the heap and added some stuff for dijkstra