setdegrees function added