implement degree functions