correct calculation of degrees