Updated the prim algorithm to actually draw the path