add index in heap
heap and graph