changed implementation of hasEdge from map based to ufd based (on the way to remove any map)
made partiotions rep. iterable