added lazy prim mst computation