Added detection of rotation in degrees to the program