iteration 3 - sprint one

added class factory design for id iteration
implemented Kruskal's algorithm