added the filter_singletons feature; had to convert graph representation since the node indices change ... easier way to do this?