adding checking if set is a spanning set
Fixed spanning set test
fixed bug with self-loops