graph working with associated tests
fixed small inefficiencies with edges using sets