rewrite prim with heapq: prim_std
add Edit distance