correctd the units to degrees function