added for each loops, lists, misc. functions. Just about have the first
algorithm (Prim's algorithm) working!