minor changes to countdegree