correct prim algorithm