added setDegree