differentiate graphs for building groups