complete prim with verticeHeap method