Add work begin prim's algorithm