Prim's algorithm

good catch. thanks!