updated countdegree, changed options