small change in degree()

removed debug code