Prim Algorithm - not tested yet